package others;

import java.io.File;

import models.Submission;

public abstract class SubmissionsRepository {

	public abstract byte[] getSubmissionKey(Submission submission);

	public abstract File getSubmission(byte[] key);

	public abstract void saveSubmission(byte[] key, File file);

	public File getSubmission(Submission submission) {
		return getSubmission(getSubmissionKey(submission));
	}

	public void saveSubmission(Submission submission, File file) {
		saveSubmission(getSubmissionKey(submission), file);
	}
}